
<div class="middle-box text-center loginscreen ">
    <div>
        <h3>{{ 'REGISTER_HEADER' | translate }}</h3>
        <p>{{ 'REGISTER_PARAGRAPH' | translate }}</p>
        <div class="background">
      <div class="register-btn ">
        <button class="btn btn-w-m  btn-white person disabled" disabled ng-click="changeUserType(1)" type="button">{{ 'REGISTER_PERSONAL' | translate }}</button>
        <button class="btn btn-w-m  btn-success doctor" ng-click="changeUserType(2)" type="button">{{ 'REGISTER_DOCTOR' | translate }}</button>
      </div>
        <form class="m-t" role="form" ng-submit="register()" >
            <div class="form-group">
                <input type="text" id="username" oninput="check(this,'格式不正确，请填入正确的手机号码')" class="form-control" class="form-control" pattern="^1\d{10}$" ng-model="username" placeholder="{{ 'REGISTER_PHONE' | translate }}" required="">
            </div>
            <div class="form-group">
            <input type="password" class="form-control" pattern="^[a-zA-Z0-9!@#$%?_+-,./;']{6,20}$" placeholder="{{ 'REGISTER_PASSWORDMIN6' | translate }}" ng-model="password" required="">
            </div>
            <div class="form-group">
            <input type="password" class="form-control" pattern="^[a-zA-Z0-9!@#$%?_+-,./;']{6,20}$" placeholder="{{ 'REGISTER_PASSWORD_CONFIRM' | translate }}" ng-model="password2" required="">
            </div>
            <div class="form-group">
                <input type="email" class="form-control" placeholder="{{ 'REGISTER_EMAIL' | translate }}" ng-model="email" required="">
            </div>
            <div class="form-group register_code">
            <input type="text" class="form-control" placeholder="{{ 'REGISTER_CODE' | translate }}" ng-model="checkcode" required="">
            </div>
            <div class="code_btn">
              <button class="btn btn-primary btn-sm code_btn2" type="button" ng-click="sendMobile()">{{'REGISTER_CODE_SEND' | translate }}</button>
            </div>
            <!--<div class="form-group icheck">-->
                <!--<div class="checkbox i-checks"><label> <input type="checkbox"> {{ 'REGISTER_AGREE' | translate }} </label></div>-->
              <div class="checkbox checkbox-success form-group pull-left" id="icheckbox">
                <input type="checkbox" id="checkbox3" required="">
                <label for="checkbox3">
                  <a ng-click="open()">{{ 'REGISTER_AGREE' | translate }}</a>
                </label>
              </div>
            <!--</div>-->
            <button type="submit" class="btn btn-primary block full-width m-b">{{ 'REGISTER_REGISTER'| translate }}</button>
            <p class="text-muted text-center"><small>{{ 'REGISTER_ALREADY_ACCOUNT' | translate }}</small></p>
            <a class="btn btn-sm btn-white btn-block" ui-sref="login">{{'FORGET_PASSWORD_RETURN'| translate}}</a>
        </form>
        </div>
    </div>
  <!--------kaman--------->
</div>

<toaster-container></toaster-container>
<script type="text/javascript">
 function check(i,tip){
    if(i.validity.patternMismatch===true){
      i.setCustomValidity(tip);
    }
    else{
      i.setCustomValidity('');
    }
  }
</script>



